def namelist_read (working_dir, namelist_file='namelist.xml'):

    import xml.etree.ElementTree as ET
    import os

    tree = ET.parse(os.path.join(working_dir,namelist_file))
    root = tree.getroot()

    params = {}

    for parameter in root.findall('parameter'):
        name = parameter.get('name')
        value = parameter.find('value').text
        params[name] = value
        
    return params

